package cn.com.demo.tool;

import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException, NoSuchFieldException, InstantiationException, IllegalAccessException {
        DataDto load = PropertiesUtil.load("/config.properties", DataDto.class);
        System.out.println(load);
    }
}
class DataDto{
    private String userName;
    private Integer age;
    private Byte sex;
    private Boolean enable;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Byte getSex() {
        return sex;
    }

    public void setSex(Byte sex) {
        this.sex = sex;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    @Override
    public String toString() {
        return "DataDto{" +
                "userName='" + userName + '\'' +
                ", age=" + age +
                ", sex=" + sex +
                ", enable=" + enable +
                '}';
    }
}